﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/MasterAdmin.master" AutoEventWireup="true"
    CodeFile="UpdateOrder.aspx.cs" Inherits="Admin_UpdateOrder" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <h1>
        Update Order</h1>
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View0" runat="server">
            <table style="width: 100%;">
                <tr>
                    <td>
                        OrderNumber
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlOrders" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <asp:Button ID="btnViewDetail" runat="server" Text="View Order Detail" OnClick="btnView_Click" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        Status
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlStatus1" runat="server">
                            <asp:ListItem Value="-1">Choose Status</asp:ListItem>
                            <asp:ListItem Value="0">Pending</asp:ListItem>
                            <asp:ListItem Value="1">Completed</asp:ListItem>
                            <asp:ListItem Value="2">Cancel</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <asp:Button ID="btnUpdate1" runat="server" OnClick="btnUpdate_Click" Text="Update" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
            <br />
            <asp:GridView ID="gvDetails1" runat="server" AutoGenerateColumns="false">
                <Columns>
                    <asp:TemplateField HeaderText="Order Code">
                        <ItemTemplate>
                            <asp:Label ID="lblOrderCode" runat="server" Text='<%# Eval("OrderCode") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Name Product">
                        <ItemTemplate>
                            <asp:Label ID="lblProductName" runat="server" Text='<%# Eval("NameProduct") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Quantity">
                        <ItemTemplate>
                            <asp:TextBox ID="txtQty" runat="server" Text='<%# Eval("Quantity") %>'></asp:TextBox>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <br />
            <br />
            <br />
        </asp:View>
        <asp:View ID="View1" runat="server">
            <asp:DropDownList ID="ddlStatus2" runat="server">
                <asp:ListItem Value="-1">Choose Status</asp:ListItem>
                <asp:ListItem Value="0">Pending</asp:ListItem>
                <asp:ListItem Value="1">Completed</asp:ListItem>
                <asp:ListItem Value="2">Cancel</asp:ListItem>
            </asp:DropDownList>
            <br />
            <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
            <br />
            <asp:Button ID="btnUpdate2" runat="server" Text="Update" OnClick="btnUpdate2_Click" />
            <br />
            <br />
            <asp:GridView ID="gvDetails2" runat="server" AutoGenerateColumns="false">
                <Columns>
                    <asp:TemplateField HeaderText="Order Code">
                        <ItemTemplate>
                            <asp:Label ID="lblOrderCode" runat="server" Text='<%# Eval("OrderCode") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Name Product">
                        <ItemTemplate>
                            <asp:Label ID="lblProductName" runat="server" Text='<%# Eval("NameProduct") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Quantity">
                        <ItemTemplate>
                            <asp:TextBox ID="txtQty" runat="server" Text='<%# Eval("Quantity") %>'></asp:TextBox>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </asp:View>
    </asp:MultiView>
</asp:Content>
